package com.cya.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * @author ：陈奕安（3048279304@qq.com）
 * @date ：Created in 2025/11/3 20:55
 * @description：
 * @modified By：
 * @version:
 */

@Getter
@AllArgsConstructor
public enum ActivityPrizeTiersEnum {
    FIRST_PRIZE(1,"一等奖"),
    SECOND_PRIZE(2,"二等奖"),
    THIRD_PRIZE(3,"三等奖");

    private final  Integer code;

    private final  String message;

    public static ActivityPrizeTiersEnum forName(String name){

        for (ActivityPrizeTiersEnum activityPrizeTiersEnum:ActivityPrizeTiersEnum.values()){

            if (activityPrizeTiersEnum.name().equalsIgnoreCase(name)){
                return activityPrizeTiersEnum;
            }
        }
        return null;
    }
}